package com.ideacome.test.service;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Aspect
@Component("ccc")
public class CAspectService2 {


    @Pointcut("execution(* com.ideacome.test.service.TestAspectService.*(..))")//指向自定义注解路径
    public void p2() {
    }

    /**
     * 切面记录系统日志
     *
     * @param point
     * @return
     * @throws Throwable
     */
    @Around("p2()")//
    public Object around2(ProceedingJoinPoint point) throws Throwable {
        System.out.println("a2");
        return point.proceed();
    }


}
